package server.rest;

import java.io.IOException;
import java.io.InputStream;
import java.util.zip.GZIPInputStream;
import org.apache.http.HttpEntity;
import org.apache.http.entity.HttpEntityWrapper;

public class GzipDecompressingHttpEntity extends HttpEntityWrapper
{

    public GzipDecompressingHttpEntity(final HttpEntity wrapped)
    {
        super(wrapped);
    }

    public long getContentLength()
    {
        return -1;
    }

    public InputStream getContent() throws IOException
    {
        return new GZIPInputStream(wrappedEntity.getContent());
    }

    
}
